]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Do not try to animate a St.Adjustment with unmapped actor
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 4 Dec 2025 04:18:04 +0000 (05:18 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 5 Dec 2025 21:58:48 +0000 (21:58 +0000)
We were already doing this for actual actors, but the case was
skipped in the St.Adjustment case.

However, as it is an animatable we can just use its related actor as
reference, and keep the same logic despite their actual object type

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3991>

js/ui/environment.js

index 369f9de49c8b271c6b6628345774f19c6d6080ae..094b95018d8c3a3f05e29103bff3e01311113617 100644 (file)
@@ -197,9 +197,12 @@ function _easeAnimatableProperty(animatable, propName, target, params) {
     // whether the transition should finish where it started
     const isReversed = autoReverse && numIterations % 2 === 0;
 
+    // The object is a Clutter.Animatable.
+    const actor = animatable.get_actor();
+
     // Copy Clutter's behavior for implicit animations, see
     // should_skip_implicit_transition()
-    if (animatable instanceof Clutter.Actor && !animatable.mapped)
+    if (!actor?.mapped)
         duration = 0;
 
     const prepare = () => {